window.onload = function() {
	var barChart = echarts.init(document.getElementById('barChart'));
		var dataAxis = ['微信', '微博', '新闻', '问答', '论坛'];
		var data = [220, 310, 423, 125, 220];
		var yMax = 500;

		option = {
			title: {
//				text: '媒体相关数据统计',
			},
			tooltip: {
				trigger: 'item',
			},
			grid: {
					left: '0',
					right: '2%',
					bottom: '0',
					top: '0',
					containLabel: true
				},
			xAxis: {
				
				data: dataAxis,
				axisLabel: {
					textStyle: {
						color: '#222'
					}
				},
				axisTick: {
					show: false
				},
				axisLine: {
					show: false
				},
				z: 10
			},
			yAxis: {
				
				axisLine: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLabel: {
					show: false
				}
			},
//			dataZoom: [{
//				type: 'inside'
//			}],
			series: [{
				type: 'bar',
				// barWidth : 16,//柱图宽度
				barMaxWidth: 16, //最大宽度
				itemStyle: {
					normal: {
						label: {
							show: true,
							textStyle: {
								fontWeight: 'bolder',
								fontSize: '12',
								color: "#dc3a38",
								fontFamily: '微软雅黑'
							},
							position: 'top'
						},
						color: new echarts.graphic.LinearGradient(
							0, 0, 0, 1, [{
									offset: 0,
									color: '#f7948f'
								},
								{
									offset: 1,
									color: '#dc3a38'
								}
							]
						)
					},
					emphasis: {
						color: new echarts.graphic.LinearGradient(
							0, 0, 0, 1, [{
									offset: 0,
									color: '#dc3a38'
								},
								{
									offset: 1,
									color: '#f7948f'
								}
							]
						)
					}
				},
				data: data
			}]
		};
		barChart.setOption(option)

	};